package dht.simulation;

import dse.IOUtil;
import dse.modules.eln.EarthLikeNetwork;
import dse.modules.eln.EarthLikeNetworkCostCalculator;

public class DhtTest {

	public static void main(String[] args) throws Exception {
		EarthLikeNetwork network;
		EarthLikeNetworkCostCalculator networkCostCalculator = new EarthLikeNetworkCostCalculator();
		network = IOUtil.NetworkFromFile(GlobalVariables.networkFile);

		double networkCost;
		int from = 1, to = 3;
		int size = GlobalVariables.fileBlockSize
				* (GlobalVariables.maxFileBlockNumber - 10);
		networkCost = networkCostCalculator.cost(network,
				network.lookupNode(from), network.lookupNode(to), size);
		System.out.println(networkCost);
	}
}
